import React from "react";
import styles from "./Advertise.module.css";
import {Carousel, Image} from 'antd';
import {useSelector} from "../../../../store/hook";

/**
 * 描述：轮播广告
 * 作者：刘飞华
 * 日期：2024/3/29 15:29
 */
export const Advertise: React.FC = () => {

    const data = useSelector(s => s.home.data)

    return (
        <Carousel autoplay className={styles.slider}>
            {data != null && data.advertiseList.map((item) =>
                <Image key={item.id} width={'100%'} height={256} src={item.pic}/>)
            }
        </Carousel>
    );
}
